﻿using System.Data;


namespace ExpertMIS.Manage
{
    public class ExpertHelper
    {

        //public DataTable GetExpertList(string domainOID, int pageSize, int currentPage)
        //{
        //    string sql = ManageHelper.GetPagingSQL(
        //            currentPage,
        //            pageSize,
        //            "F_TotalGrade Desc",
        //            "e.F_OID as ExpertId,e.F_Name as ExpertName,e.F_Gender as ExpertGender,b.Name as DomainName",
        //            "T_EXP_EXPERT e, T_EXP_EXPERTBELONGDOMAIN b",
        //            "b.F_ExpertOID = e.F_OID AND b.F_DomainOID='" + domainOID + "'");

        //    return ManageHelper.GetDataTable(sql);
        //}

        //public DataTable GetExpertList(int pageSize, int currentPage)
        //{
        //    string sql = ManageHelper.GetPagingSQL(
        //           currentPage,
        //           pageSize,
        //           "F_TotalGrade Desc",
        //           "e.F_OID as ExpertId,e.F_Name as ExpertName,e.F_Gender as ExpertGender,b.Name as DomainName",
        //           "T_EXP_EXPERT e, T_EXP_EXPERTBELONGDOMAIN b",
        //           "b.F_ExpertOID = e.F_OID");

        //    return ManageHelper.GetDataTable(sql);
        //}

        public DataTable GetExpertList()
        {
            string sql = "SELECT e.F_OID,d.F_DomainName as domain,e.F_Name ,e.F_Gender ,e.F_Phone ,e.F_CellPhone,e.F_EMail FROM T_Exp_Expert e ,T_Exp_ExpertBelongDomain b,T_Exp_Domain d WHERE b.F_ExpertOID = e.F_OID AND d.F_OID = b.F_DomainOID";
            return QuestionHelper.GetDataTable(sql);
        }
    }
}

